<template>
  <div>
    <!-- :router="true" -->
    <el-menu
    style="border:none"
      active-text-color="#ffd04b"
      background-color="#4B4453"
      class="el-menu-vertical-demo"
      :router="true"
      default-active="/home/worktabe"
      text-color="#fff"
      @open="handleOpen"
      @close="handleClose"
    >
    <el-menu-item index="/home/worktabe">
      <el-icon><Monitor /></el-icon>
        <span>工作台</span>
      </el-menu-item>

      <el-sub-menu index="1">
        <template #title>
          <el-icon>
            <Edit />
          </el-icon>
          <span>签约管理</span>
        </template>
        <el-menu-item index="1-1">待处理签约</el-menu-item>
        <el-menu-item index="1-2">签约记录</el-menu-item>

        <!-- <el-sub-menu index="1-4">
          <template #title>item four</template>
          <el-menu-item index="1-4-1">item one</el-menu-item>
        </el-sub-menu> -->
      </el-sub-menu>

      <el-sub-menu index="3">
        <template #title>
          <el-icon>
            <document />
          </el-icon>
          <span>服务管理</span>
        </template>
        <el-menu-item index="3-1">待处理服务</el-menu-item>
        <el-menu-item index="3-2">服务记录</el-menu-item>
      </el-sub-menu>

      <el-menu-item index="/home/residentManage">
        <el-icon>
          <UserFilled />
        </el-icon>
        <span>居民管理</span>
      </el-menu-item>

      <el-menu-item index="5">
        <el-icon>
          <ChatDotSquare />
        </el-icon>
        <span>消息管理</span>
      </el-menu-item>

      <el-menu-item index="6" disabled>
        <el-icon>
          <DocumentCopy />
        </el-icon>
        <span>资料管理</span>
      </el-menu-item>

      <el-sub-menu index="7">
        <template #title>
          <el-icon>
            <Histogram />
          </el-icon>
          <span>数据统计</span>
        </template>
        <el-menu-item index="/home/DataOverview">数据概况</el-menu-item>
        <el-menu-item index="/home/SigningStatistics">签约业绩统计</el-menu-item>
        <el-menu-item index="/home/ServiceStatistics">服务业绩统计</el-menu-item>
      </el-sub-menu>

      <el-menu-item index="8" disabled>
        <el-icon>
          <setting />
        </el-icon>
        <span>系统设置</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>
  
<script lang="ts">
import { defineComponent, ref } from "vue";

export default defineComponent({
  name: "NavigationBar",
  components: {},
  setup() {
    const handleOpen = (key: string, keyPath: string[]) => {
      // console.log(key, keyPath);
    };
    const handleClose = (key: string, keyPath: string[]) => {
      // console.log(key, keyPath);
    };
    return {
      handleOpen,
      handleClose
    };
  },
});
</script>
<style lang="less">
.el-menu-item.is-active {
  background-color: #008E9B;
}
</style>